package com.main.controller;

import java.io.Serializable;

import javax.servlet.http.HttpServletRequest;

import net.sf.json.JSONArray;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.web.util.GenericoUtil;

@Controller
@RequestMapping("/admin")
public class AdministracionController extends BaseController{


	@SuppressWarnings("static-access")
	@RequestMapping(value = "")
	public String admin(HttpServletRequest request, ModelMap model){
		GenericoUtil genericoUtil = new GenericoUtil();
		model.put("rolUsuario", genericoUtil.hasRole("ROLE_CLIENTE") == true ? "ROLE_CLIENTE":"");
		model.put("usuarioId", genericoUtil.getSgdUsuarioIdFromAcegi());
		model.put("userName", genericoUtil.getUserName());
		return "admin/homeAdministracion";
	}
	
}
